Various peripherals such as printers, scanners, card readers, camcoders, network hubs, digital cameras, etc. have been commercially available as information technology has known a rapid and spectacular development in recent years. Such peripherals not only increase the performance of computer but also enable a user to perform tasks that are not possible in the past by utilizing the computer and the associated peripherals. For instance, video conference through the Internet, editing digital images taken by a digital camera or camcoder, or the like is effected. This can greatly increase the convenience and popularity of information products among consumers. However, installations of the peripherals can cause trouble to a user. Typically, a computer must be shut down prior to installing a desired peripheral in the computer. Next, connect the peripheral to an input/output (I/O) port at a rear of the computer. Then turn on the computer to install an associated driver. After installation, reset the computer to activate the peripheral for operating in cooperating with the computer. In view of this, the installation processes of the peripherals are tedious and don't provide a Plug and Play feature thereon. Only a few I/O ports of the computer also limits the number of peripherals that can be coupled to the computer. As a result, a performance of computer cannot increase as expected.
For solving this problem, seven major computer and/or telecommunication companies developed a rule of USB interface specifications recently. It is envisaged that faster signal transmission rate, Plug and Play (i.e., more convenient), and enhanced expansion capability of electronic products can be carried out by the rule of USB interface specifications. In general, a computer complied with the USB interface specifications can only provide two USB ports each capable of coupling to 127 peripherals via an external Ethernet adaptor. Moreover, it is allowed to add or delete any peripheral depending on applications. Further, no driver installation or repeated resetting of computer is required. Hence, an installation process of peripheral becomes more user friendly.
For instance, an electronic product complied with the USB interface specifications is shown as an Ethernet adaptor 10 in FIGS. 1 and 4. The Ethernet adaptor 10 comprises an Application Specific Integrated Circuit (hereinafter abbreviated as ASIC) 13, Flash RAM 15 and other necessary electronic components and circuits, wherein the ASIC 13 comprises at least a USB device controller 11, a microprocessor 12 and a plurality of memory components (e.g., static random access memories, abbreviated as SRAMs) 14. As shown in FIG. 2, when the Ethernet adaptor 10 is coupled to a USB port (not shown) of a client host 20 through a USB connecting line 21 and, at the same time, connected to a Ethernet Local Area Network 30 via a network connecting line 16, the USB device controller 11 acts to transmit or receive USB packets between the client host 20 and the Ethernet adaptor 10 in order to transform USB packets received through USB interface into network packets having Ethernet MAC frames and then transmit the same to the Ethernet Local Area Network 30, or transform network packets with Ethernet MAC frames received from the Ethernet Local Area Network 30 into USB packets and then transmit the same through USB interface to the client host 20. The microprocessor 12 acts to control all the electronic components being operated in normal situations during transmitting or receiving the USB packets. The memory components (e.g., SRAMs) 14 act to store USB interface programs. Further, other memory components (e.g., flash RAMs 15) act to store intermediate data created in the operations. As a result, a task of transmitting or receiving the USB packets assigned by the client host 20 can be achieved by the Ethernet adaptor 10.
Typically, an Ethernet network interface complied with the USB interface specifications is also installed in the client host 20, which comprises an ASIC 13 (having at least a USB device controller 11 and a microprocessor 12) and other necessary electronic components and circuits (not shown), in order to transform network packets having Ethernet MAC frames produced by a network software 24 installed in the client host 20 into USB packets and then transmit the same through USB interface to the Ethernet adaptor 10, or transform USB packets received from the Ethernet adaptor 10 into network packets having Ethernet MAC frames.
Since all the network packets transmitted within the above-mentioned conventional Ethernet adaptor 10 and the client host 20 are through the USB interface, the ASIC 13 of the Ethernet adaptor 10 has to be designed with a special mechanism for packet processing according to a well-known implementation mentioned in “Section 3.8 USB Networking Models” in “Universal Serial Bus Class Definitions for Communication Devices” standard, which allows any type of Ethernet adaptors 10 complied with the USB interface specifications to transmit network packets with the client host 20 through the endpoints defined by them according to the USB interface specification (the so-called logical communication pipe), and also enables the Ethernet adaptors 10 or client host 20 to describe the beginning and ending of a segment within the data stream delivered by the endpoint thereof.
In general, when the conventional Ethernet adaptor 10 transmits or receives network packets having Ethernet MAC frames (hereinafter referred as network packets in order to distinguish from the USB packets) over USB interface (bus), the Ethernet adaptor 10 utilizes an USB short packet mechanism to encapsulate the network packets transmitted through the USB bus between the client host 20 and Ethernet adaptor, and delineate the segment of the network packets in order to complete the transferring between the network packets and USB packets. During the procedure of transferring, as shown in FIG. 3, when a segment of network packet is transferred into N USB packets, if the first USB packet through the N-1st USB packet are all in the maximum packet size defined for the USB endpoint and the Nth packet is in a size less than the maximum packet size, the Ethernet adaptor 10 will generate a short packet to identify the end of the segment while transmitting packets through the USB interface. Otherwise, if the Nth packet is in a size exactly the maximum packet size, a zero-length packet shall be added behind the Nth packet as a short packet to assure the end of segment being properly identified.
FIG. 4 shows a Network packet having Ethernet MAC frames as an example, when a client host 20 intends to transmit the network packet to a Ethernet adaptor 10 through the USB interface, a USB driver 25 installed in the client host 20 has to execute an appropriate encapsulation with respect to the network packets, and then generate and transmit a short packet to the Ethernet adaptor 10. Hence, during Bulk Out/In Transactions, the client host 20 shall have the ability to write a zero-length packet into a buffer in order to generate a short packet while transferring the network packet into a plurality of USB packets having the maximum packet size defined for the USB endpoint. Besides, with respect to the client host 20, the size of the segment in network packet is negotiable while the network packet being transferred into USB packets. Typically, a Network packet (not including the CRC) are 1514 byte or less in length, which could be much longer in other communication protocol, e.g. 802.1Q VLAN tagging. In general, within the network packet, the whole data between the Ethernet destination address (DA) up to the end of the data field belongs to the data being transmitted. As regards the CRC checksum must not be included for either send or receive data, which is generated and checked by the device hardware of the client host 20 or Ethernet adaptor 10 as required for the specific media.
Again referring to FIG. 4, when the client host 20 intends to transmit or receive a network packet over the USB bus, a network software 24 installed therein will generate a Bulk I/O Request Packet (hereinafter abbreviated as Bulk IRP) first, and transmit the Bulk IRP to a USB driver 25, which in turn requests a host controller driver 26 of the client host 20 to start segmenting the network packet into a plurality of Bulk I/O transaction ready for being serialized by a host controller 27. The host controller 27 then transmits the packets to the ASIC 13 of the Ethernet adaptor 10 over the USB bus. As a result, the USB packets received by the ASIC 13 is in turn transferred into network packet having Ethernet MAC fame and then transmitted to the Ethernet Local Area Network 30.
In the above-mentioned network packet processing mechanism, since the network software 24 in the client host 20 would have to transmit an Bulk IRP to the USB driver 25 for each and every network packet having Ethernet MAC frame being transmitted or received regardless of the size thereof, the mechanism can significantly degrade the overall network packet throughput on some low-end host system due to insufficient real-time computing power. Besides, it has to be especially mentioned here that, when a burst of network packets being transmitted, the USB driver 25 will start the processing of a series of queuing Bulk IRP generated by the network software 24 only after the processing of the currently servicing IRP being completed by the USB driver 25. In case the conventional mechanism is applied to a high speed Gigabit Ethernet application, since the network packet transmitting rate of this kind of application is much higher, the one IRP per network packet servicing model can no longer work very well unless a high-end host system with sufficient real-time computing power is used. Therefore, the performance of host system's software driver and the MAC frame burst patterns and its frame size of network packet becomes very critical in determining Ethernet network packet throughput.